Stored Procedures [dbo].[dt_droppropertiesbyid]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@idint4
@propertyvarchar(64)64
Permissions
TypeActionOwning Principal
GrantExecutepublic
SQL Script
/*
**    Drop one or all the associated properties of an object or an attribute
**
**    dt_dropproperties objid, null or '' -- drop all properties of the object itself
**    dt_dropproperties objid, property -- drop the property
*/

create procedure dbo.dt_droppropertiesbyid
    @id int,
    @property varchar(64)
as
    set nocount on

    if (@property is null) or (@property = '')
        delete from dbo.dtproperties where objectid=@id
    else
        delete from dbo.dtproperties
            where objectid=@id and property=@property
GO
GRANT EXECUTE ON  [dbo].[dt_droppropertiesbyid] TO [public]
GO
Uses
Used By